home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 24 / Amiga Format AFCD24 (Feb 1998, Issue 108).iso / -seriously_amiga- / shareware / programming / c / orion / oriontool.txt < prev    next >
Text File  |  1998-01-05  |  3KB  |  66 lines

  1. OrionTool - A tool to setup, cleanup, and manipulate the list
  2.    of resource allocations by programs using Orion.
  3.    This is a shell only tool.
  4.  
  5. Usage Template:
  6.    OrionTool L=List/S,Q=Quit/S,C=Clean/S,V=Verbose/S,NV=NoVerbose/S,
  7.       I=Interactive/S,NI=Interactive/S,T=Trash/S,NT=NoTrash/S,File/K
  8.  
  9. Without any arguments, it simply sets up the resource tracking
  10. structures.  If it's already been setup, it won't do anything.
  11.  
  12. List: Causes the list of all currently tracked resources to be dumped
  13. to the shell.  Shows task name, size of allocation, and its address.
  14. It also shows the line number and source file name where the allocation
  15. was made.
  16. ** The sizes listed for bitmaps may not exactly match the values passed
  17. ** to AllocBitMap() due to alignment restrictions.
  18.  
  19. Quit: Removes the resource tracking structures, and frees all memory
  20. associated with the tracking.  Memory being tracked is *NOT* freed.
  21.  
  22. Clean: Frees all resources being tracked and removes the resource
  23. tracking from the system.  Be very careful with this.  Only use this
  24. if you are tracking a single task and it either has finished execution
  25. or it has hung.  Otherwise bad things could happen.
  26.  
  27. Verbose/NoVerbose:Every allocation and free function is logged.  All parameters
  28. and return values are shown.  This is a flag.  You can set it when
  29. you setup the tracking, or turn it on after the tracking is already
  30. setup.  NoVerbose turns off the tracking.   Default:NoVerbose
  31.  
  32. Interactive/NoInteractive:When this flags is set, you are prompted when
  33. you free something you didn't allocate or free a different size than you
  34. allocated.  When you free something that isn't in the track list, your
  35. options are:Free Anyway, or Ignore.  Selecting 'Free' frees the allocation,
  36. 'Ignore' leaves it alone.
  37. When you free a different size the options are:Free Anyway,Free Original,
  38. Ignore.  'Free Anyway' and 'Ignore' are the same as the other option.
  39. 'Free Original' ignores the arguement you supplied and frees what Orion
  40. thinks you allocated.   Default:Interactive
  41.  
  42. Trash:Memory allocations(AllocVec,AllocMem,malloc,AllocPooled) are filled
  43. with garbage after being freed.
  44. After being allocated memory is filled with garbage(AllocVec,AllocMem,
  45. malloc).  With AllocVec and AllocMem, this won't be done if the
  46. MEMF_CLEAR flag is set.
  47. Note:This can slow your program down significantly.
  48. Default:NoTrash
  49.  
  50. File: This is the name of the file to be used for error messages when
  51. allocating/freeing resources.  Only specify this when setting up the
  52. tracking resources.  If not specified, the default is a CON: window.
  53. You can specify any valid DOS path. (NULL:,SER:, CON:, RAD:error.log)
  54. Note:If you don't setup the system with this tool, the first program
  55. to allocate a resource will set it up with CON: as the default.
  56.  
  57. All tracking is done in a very clean way.  No system routines are patched
  58. and only programs that are Orion-aware are tracked.
  59.  
  60. Eventually this program will be replaced by one with a proper GUI.
  61. Individual allocations will be viewable, editable, and freeable.
  62. Freeing resources by Task name will also be possible.
  63.  
  64. Because of this I haven't spent a lot of time making this utility
  65. amazingly brilliant.  It's good enough for now.
  66.